package Astar;

import java.util.Comparator;


class CostComparator implements Comparator<Node>
{
    public int compare( Node n1, Node n2 )
    {
        double a = n1.getCost();
        double b = n2.getCost();

        if( a > b )
        {
            return 1;
        }
        else if( a < b )
        {
            return -1;
        }else
        {
            return 0;
        }
    }
}
